<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>角色添加</title>
<link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/list.js"></script>
<script type="text/javascript">
$().ready(function() {

	[@flash_message /]

});
</script>
</head>
<body>
<!-- 地址导航-->
<div class="path">
    <a href="${base}/admin/main/index.do">首页</a> &raquo;角色列表<span>${page.total}</span>
</div>
	<form id="listForm" action="list.do" method="get">
        <div class="bar">
            <a href="add.do" class="iconButton">
                <span class="addIcon">&nbsp;</span>添加
            </a>
            <div class="buttonWrap">
                <a href="javascript:;" id="deleteButton" class="iconButton disabled">
                    <span class="deleteIcon">&nbsp;</span>删除
                </a>
                <a href="javascript:;" id="refreshButton" class="iconButton">
                    <span class="refreshIcon">&nbsp;</span>刷新
                </a>
                <div class="menuWrap">
                    <a href="javascript:;" id="pageSizeSelect" class="button">
                        每页条数<span class="arrow">&nbsp;</span>
                    </a>
                    <div class="popupMenu">
                        <ul id="pageSizeOption">
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 10] class="current"[/#if] val="10">10</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 20] class="current"[/#if] val="20">20</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 50] class="current"[/#if] val="50">50</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 100] class="current"[/#if] val="100">100</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
		<table id="listTable" class="list">
			<tr>
				<th class="check">
					<input type="checkbox" id="selectAll" />
				</th>
				<th>
					<a href="javascript:;" class="sort" name="name">角色名称</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="isSystem">是否内置</a>
				</th>
				<th>
					<span>角色描述</span>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="createDate">创建日期</a>
				</th>
				<th>
					<span>${message("操作")}</span>
				</th>
			</tr>
			[#list page.content as role]
				<tr>
					<td>
						<input type="checkbox" name="ids"[#if role.isSystem] title="${message("admin.role.deleteSystemNotAllowed")}" disabled="disabled"[#else] value="${role.id}"[/#if] />
					</td>
					<td>
						${role.name}
					</td>
					<td>
						${message(role.isSystem?string('是', '否'))}
					</td>
					<td>
						[#if role.description??]
							<span title="${role.description}">${abbreviate(role.description, 50, "...")}</span>
						[/#if]
					</td>
					<td>
						<span title="${role.createDate?string("yyyy-MM-dd HH:mm:ss")}">${role.createDate}</span>
					</td>
					<td>
						<a href="edit.do?id=${role.id}">[编辑]</a>
					</td>
				</tr>
			[/#list]
		</table>
	[@pagination pageNumber = page.numPerPage totalPages = page.totalPages]
		[#include "/common/pagination.ftl"]
	[/@pagination]

	</form>
</body>
</html>